import 'package:fish_redux/fish_redux.dart';
import 'package:flutter/material.dart' hide Action;

import 'action.dart';
import 'state.dart';

Widget buildView(
    DestroyState state, Dispatch dispatch, ViewService viewService) {
  return new Scaffold(
      appBar: new AppBar(
          centerTitle: true,
          elevation: 2.0,
          title: new Text(
            "注销账号",
            style: TextStyle(color: Colors.black54, fontSize: 18),
          )),
      body: Column(
        mainAxisSize: MainAxisSize.min,
        children: <Widget>[
          SizedBox(height: 80),
          Container(
            alignment: Alignment.center,
            child: Text('请仔细阅读',
                style: TextStyle(
                    fontSize: 40,
                    color: Colors.red,
                    fontWeight: FontWeight.bold)),
          ),
          SizedBox(height: 20),
          Container(
            margin: EdgeInsets.symmetric(horizontal: 40),
            child: Text('1. 注销账号后，您的账号将被永久删除，且不可恢复。'),
          ),
          SizedBox(height: 20),
          Container(
            margin: EdgeInsets.symmetric(horizontal: 40),
            child: Text('2. 注销账号后，您的相关使用数据将被永久删除，且不可恢复。'),
          ),
          SizedBox(height: 50),
          Container(
              child: RaisedButton(
            onPressed: () => dispatch(DestroyActionCreator.onDelete()),
            colorBrightness: Brightness.dark,
            child: Text("注销账号", style: new TextStyle(color: Colors.black)),
          )),
        ],
      ));
}
